import express from "express";
import {
    registerMember,
    updateMember,
    getMember,
    deleteMember,
    getMembers,
    loginByPassword,
    generateMembers,
} from "../controllers/MemberController";
import { authenticateToken } from "../middlewares/authMiddleware";

const router = express.Router();

router.post("/", registerMember);
router.post("/update", authenticateToken, updateMember);
router.get("/:memberId", getMember);
router.get("/h5/:memberId", authenticateToken, getMember);
router.delete("/:memberId", authenticateToken, deleteMember);
router.post("/page", getMembers);
router.post("/loginByPassword", loginByPassword);
router.post("/generateMembers", generateMembers);

export default router;
